<table>
    <thead>
        <tr class="ui-widget-header">
            <th>Title</th>
            <th>Assigned Devices</th>
            <th>View</th>
            <?php if ($this->acl['delete']) : ?>
            <th>Delete</th>
            <?php endif; ?>
        </tr>
    </thead>
    <tbody>
        <?php if (count($this->slidestreams) > 0) : ?>
        <?php foreach ($this->slidestreams as $s) : ?>
            <tr class="<?php $this->cycle('row1', 'row2'); ?>">
                <td>
                    <?php if ($this->acl['details']) : ?>
                        <a href="<?php echo $this->url(array('action' => 'details', 'slidestreamId' => $s['slidestreamId']), 'slidestream', true); ?>"><?php echo $s['title']; ?></a>
                    <?php else : ?>
                        <?php echo $s['title']; ?>
                    <?php endif; ?>
                </td>
                <td>
                    <?php echo count($s['devices']); ?>
                </td>
                <td>
                    <a target="_blank" href="<?php echo $this->url(array('module' => 'sign', 'action' => 'view', 'slidestreamId' => $s['slidestreamId']), 'sign', true); ?>">View Slideshow</a>
                </td>
                <?php if ($this->acl['delete']) : ?>
                <td>
                    <a class="ui-state-default ui-corner-all linkButtonNoText" href="<?php echo $this->url(array('action' => 'delete', 'slidestreamId' => $s['slidestreamId']), 'slidestream', true); ?>"><span class="ui-icon ui-icon-close"></span>&nbsp;</a>
                </td>
                <?php endif; ?>
            </tr>
        <?php endforeach; ?>
        <?php else : ?>
            <tr>
                <td colspan="4">No slidestreams found</td>
            </tr>
        <?php endif; ?>
    </tbody>
</table>